package com.atguigu.gulimall.product.feign;


import com.atguigu.common.to.SkuReductionTo;
import com.atguigu.common.to.SpuBoundsTo;
import com.atguigu.common.utils.R;
import org.springframework.beans.BeanUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    /**
     * Author : hmy
     * @date 2021/7/4 13:48
     * desc :
     *   1:首先将RequestBody对象转为json
     *   2:找到对应的服务，然后会将这个json转为对应的实体类，如果这连个对象中的属性是一致的，就能够转换，否则不能转换
     *
     **/

    @PostMapping("/coupon/spubounds/saveCoupon")
    R saveCouponSpuBounds( @RequestBody  SpuBoundsTo spuBoundsTo);


    @PostMapping("/coupon/spubounds/feignTest")
    R feignTest();

    @PostMapping("/coupon/skufullreduction/saveSkuReduction")
    R saveSkuReduction(@RequestBody  SkuReductionTo skuReductionTo);
}
